﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IContainer.cs" company="Marcelo Roca">
//   Copyright (c) 2011 Marcelo Roca. All rights reserved.
// </copyright>
// <author name="Marcelo Roca" email="marce@marceloroca.com"/>
// <license>
//   This program is free software: you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation, either version 3 of the License, or
//   (at your option) any later version.
// 
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program.  If not, see http://www.gnu.org/licenses/.
// </license>
// --------------------------------------------------------------------------------------------------------------------

namespace GameKits.Unity.GuiForms
{
    using Controls;
    using UnityEngine;

    public interface IContainer
    {
        /// <summary>
        /// Gets or sets Skin.
        /// </summary>
        GUISkin Skin { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether IsEnabled.
        /// </summary>
        bool IsEnabled { get; set; }

        ///// <summary>
        ///// Pinta los controles de la colección
        ///// </summary>
        //void DrawInnerControls();
    }

    public interface IContainer<T> where T : Control
    {
        /// <summary>
        /// Adicionamos un control a la colección
        /// </summary>
        /// <param name="control">
        /// The control.
        /// </param>
        void Add(T control);

        /// <summary>
        /// Adicionamos varios controles a la colección
        /// </summary>
        /// <param name="controls">
        /// The control.
        /// </param>
        void Add(params T[] controls);

        /// <summary>
        /// Quitar el control de la lista
        /// </summary>
        /// <param name="control">
        /// The control.
        /// </param>
        /// <returns>
        /// True si existe el control
        /// </returns>
        bool Remove(T control);

        /// <summary>
        /// Indica si existe el control de la lista
        /// </summary>
        /// <param name="control">
        /// The control.
        /// </param>
        /// <returns>
        /// True si existe en la lista
        /// </returns>
        bool Contains(T control);

        /// <summary>
        /// Elimina el contenido de la lista
        /// </summary>
        void Clear();
    }
}
